<?php
class FaceController extends NodeController {
	
	/**
	 * 头像审核列表
	 * Enter description here ...
	 */
	public function faceList() {
		$rs = self::getFaceService ()->getVaildFaceList ();
		$this->view ()->assign ( 'list', $rs );
		$this->view ()->display ( 'file:member/face.tpl' );
	}
	
	public function vaild() {
		$rs = self::getFaceService ()->validFace ( $_POST ['id'], $_POST ['type'] );
		
		if ($rs != self::ERROR) {
			$rs = self::getMemberService ()->setMemberValue ( array ('face' => $rs ['face'] ), $rs ['uid'] );
		}
		
		$this->sendNotice ( $rs );
	}
	
	public static function getFaceService() {
		return new FaceService ();
	}

}